package cn.itcast.bos.service.take_delivery;

import cn.itcast.bos.domain.take_delivery.PageBean;
import cn.itcast.bos.domain.take_delivery.Promotion;
import com.sun.xml.bind.v2.model.core.ID;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.domain.Specification;

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
import java.util.Date;

public interface PromotionService {
    void save(Promotion model);

    Page<Promotion> pageQuery(Specification<Promotion> specification, Pageable pageable);

    //用来接收从bos_fore通过webService发来的请求的方法
    @Path("/pageQuery")
    @GET
    @Produces({"application/json","application/xml"})
    PageBean<Promotion> bos_forePageQuery(@QueryParam("page") int page,@QueryParam("rows") int rows);

    Promotion findOneById(Promotion model);
    //用来完成静态页面化(freeMarker)的方法
    @Path("/showDetail")
    @GET
    @Produces({"application/json","application/xml"})
     Promotion findById( @QueryParam("id") Integer id);
    //定时修改活动状态的方法
    void updata(Date date);
}
